home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / ddj0897.zip / DYN401.ZIP / examples / exam34 / main.c < prev    next >
C/C++ Source or Header  |  1995-09-27  |  2KB  |  95 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6. /*
  7.  *
  8.  *    This source code is CONFIDENTIAL and
  9.  *    PROPRIETARY to Algorithms Corporation. Unauthorized
  10.  *    distribution, adaptation or use    may
  11.  *    be subject to civil and    criminal penalties.
  12.  *
  13.  *    Copyright (c) 1993 Algorithms Corporation
  14.  *    3020 Liberty Hills Drive
  15.  *    Franklin, TN  37064
  16.  *
  17.  *    ALL RIGHTS RESERVED.
  18.  *
  19.  *
  20.  *
  21.  */
  22.  
  23.  
  24.  
  25. #include "generics.h"
  26.  
  27.  
  28. main(int argc, char *argv[])
  29. {
  30.     object    a, b, c;
  31.  
  32.     InitDynace(&argc);
  33.  
  34.     /*  I must use the garbage collector because I am not manually
  35.         disposing of the objects I will be creating.  */
  36.     
  37.     gSetMemoryBufferArea(Dynace, 50000L);
  38.  
  39.  
  40.     a = gNewWithInt(ShortInteger, 7);
  41.     b = gNewWithDouble(DoubleFloat, 3.131);
  42.  
  43.     gPrint(a, stdoutStream);
  44.     gPrint(b, stdoutStream);
  45.  
  46.     c = gFormatNumber(a, "", 0, 2);
  47.     gPrint(c, stdoutStream);
  48.  
  49.     c = gFormatNumber(b, "", 0, 2);
  50.     gPrint(c, stdoutStream);
  51.     
  52.     b = gNewWithDouble(DoubleFloat, 2345678.87);
  53.     c = gFormatNumber(b, "CD", 0, 2);
  54.     gPrint(c, stdoutStream);
  55.  
  56.     a = gToday(Date);
  57.     c = gFormatDate(a, "%N/%D/%y");
  58.     gPrint(c, stdoutStream);
  59.     c = gFormatDate(a, "%N/%D/%Y");
  60.     gPrint(c, stdoutStream);
  61.     c = gFormatDate(a, "%W  %M %d%s, %Y  %T");
  62.     gPrint(c, stdoutStream);
  63.     c = gFormatDate(a, "%m. %d, %Y");
  64.     gPrint(c, stdoutStream);
  65.     c = gFormatDate(a, "%W the %d%s of %M");
  66.     gPrint(c, stdoutStream);
  67.  
  68.     return 0;
  69. }
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77. /*
  78.  *
  79.  *    This source code is CONFIDENTIAL and
  80.  *    PROPRIETARY to Algorithms Corporation. Unauthorized
  81.  *    distribution, adaptation or use    may
  82.  *    be subject to civil and    criminal penalties.
  83.  *
  84.  *    Copyright (c) 1993 Algorithms Corporation
  85.  *    3020 Liberty Hills Drive
  86.  *    Franklin, TN  37064
  87.  *
  88.  *    ALL RIGHTS RESERVED.
  89.  *
  90.  *
  91.  *
  92.  */
  93.  
  94.  
  95.